import Vue from 'vue'
import App from './App.vue'
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload,{
  loading:atm
})
import atm from '@/assets/1.gif'
//三级联动组件
import TypeNav from "@/components/TypeNav";
import Carousel from "@/components/Carousel";
//分页组件
import Pagination from "@/components/Pagination";
//全局组件：第一个参数 组件名字  第二个参数：那个组件
Vue.component(TypeNav.name, TypeNav);
Vue.component(Carousel.name, Carousel);
Vue.component(Pagination.name, Pagination);
import "@/mock/mockServe";
//swiper
import "swiper/css/swiper.css"
import './plugins/element.js'
//引入自定义插件
import myPlugins from '@/plugins/myPlugins';
Vue.use(myPlugins,{
    name:'upper'
});
//引入表单校验插件
import "@/plugins/validate";
//引入路由相关文件
import router from "@/router";
import store from '@/store';
Vue.config.productionTip = false
import *as API from '@/api'
//console.log(API);
new Vue({
  beforeCreate(){
    Vue.prototype.$bus=this
    Vue.prototype.$API=API
  },
  router,
  store,
  render: h => h(App),
}).$mount('#app')
